<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <jsp:include page="../basePath.jsp"></jsp:include>
    <title>审核任务</title>
    <script language="javascript" src="page/submitted/submit_report.js" charset="utf-8"></script>
  </head>
  
  <body class="scrolling" style="overflow:auto">
  	<div class="div">
	  <div id="ListDiv" align="center" style="padding:8px 2px 0 2px" >
	  
<c:choose>
	<c:when test="${empty submitReport}">
		<h1>无审批内容</h1>
	</c:when>
	<c:otherwise>
	
	   <div style="width:100%;overflow-x:auto;scrollbar-face-color: #dcdcdc; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #ffffff; scrollbar-3dlight-color: #ffffff; scrollbar-arrow-color: #737373; scrollbar-track-color: #ffffff; scrollbar-darkshadow-color: #ffffff;">
	  	<table cellSpacing="0" cellPadding="0" width="100%" >
	  	  <tr><td style="border:1px solid rgb(195,217,255);padding:5px; line-height:1.6">
	  	  	&nbsp;&nbsp;&nbsp;&nbsp;${submitReport.content }
	  	  </td></tr>
    	  <tr><td>
        	<table cellSpacing="0" cellPadding="0" width="100%" height="100%" border="0" bordercolor="#AEAEAE" rules="rows" style="border-collapse:collapse;font-size:9pt;">
          	  <thead>
            	<tr class="queryList_titlebg" height="27">
            	  <th height="27" align="center" width="25%" nowrap class="table_td_font">流程名称</th>
            	  <th height="27" align="center" width="75%" nowrap class="table_td_font">监控报告信息</th>
            	</tr>
   			  </thead>
  			  <tbody>
		<c:forEach var="item" items="${submitReport.reportItems}" >		  
  			  	<tr class="table_td_font" bgColor="#ffffff">
  			  	  <td align="center" height="25px" class="queryList_linebg" nowrap>${item.title}</td>
  			  	  <td align="left" height="25px" class="queryList_linebg">${item.content}</td>
  			  	</tr>
		</c:forEach>
  			  	<tr class="table_td_font" bgColor="#ffffff">
  			  	  <td align="center" height="25px" class="queryList_linebg" nowrap></td>
  			  	  <td align="left" height="25px" class="queryList_linebg" style="padding:0px 0px">
  			  	  	<table cellSpacing="0" cellPadding="0" width="100%" height="100%" border="0" bordercolor="#AEAEAE" rules="rows" style="border-collapse:collapse;font-size:9pt;">
  			  	  	  <thead>
		            	<tr class="queryList_titlebg" height="27">
		            	  <th height="27" align="center" width="42%" nowrap class="table_td_font">文件名</th>
		            	  <th height="27" align="center" width="16%" nowrap class="table_td_font">文件记录数</th>
		            	  <th height="27" align="center" width="42%" nowrap class="table_td_font">文件说明</th>
		            	</tr>
		   			  </thead>
		  			  <tbody>
		<c:forEach var="file" items="${submitReport.submitLog.submitFiles}" >	
		  			  	<tr class="table_td_font" bgColor="#ffffff">
		  			  	 <td align="left" height="25px" class="queryList_linebg" nowrap>${file.fileName}</td>
		  			  	  <td align="center" height="25px" class="queryList_linebg">${file.dataCount < 0 ? '' : file.dataCount}</td>
		  			  	  <td align="left" height="25px" class="queryList_linebg" nowrap>${file.fileFullName}</td>
		  			  	</tr>
		</c:forEach>
		  			  </tbody>
  			  	  	</table>
  			  	  </td>
  			  	</tr>
  			  </tbody>
        	</table>
   		  </td></tr>
   		  <tr><td style="border:1px solid rgb(195,217,255);padding:5px; line-height:1.6">
   		  	填入意见：<br>
   		  	<input type="hidden" id="taskId" value="${submitReport.taskId }">
   		  	<textarea name="comment" id="comment" cols="90" rows="4"></textarea>
		<c:choose><c:when test="${firstNode}">
			<input type="button" value="提交" class="button" id="passed" >
   		  	<input type="button" value="作废" class="button" id="cancel" >
		</c:when><c:otherwise>
   		  	<input type="button" value="审核通过" class="button" id="passed" >
   		  	<input type="button" value="退回" class="button" id="reject" >
		</c:otherwise></c:choose>	
   		  	<br><br>
   		  </td></tr>
   		  <tr><td style="border:1px solid rgb(195,217,255);padding:5px; line-height:1.6">
   		  	各级审批意见：<br>
		<c:forEach var="ti" items="${taskInses}" >
			[${ti.actorId }]： ${ti.comment } (<fmt:formatDate value="${ti.endTime }" pattern="yyyy-MM-dd HH:mm"/>)<br />
		</c:forEach>
   		  </td></tr>
  	  	</table>
  	   </div>
		
	</c:otherwise>
</c:choose>	
	  </div>
	</div>
  </body>
</html>
